/*
package com.liaoban.app.ui.common;

import android.support.v4.app.FragmentManager;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;

import com.liaoban.app.R;
import com.liaoban.app.ui.base.BaseDialogFragment;

import butterknife.BindView;
import butterknife.OnClick;

*/
/**
 * 确认对话框
 * Created by ybc on 2017/9/20.
 *//*

@Deprecated
public class ConfirmDialogFragment extends BaseDialogFragment {

    public static ConfirmDialogFragment show(FragmentManager fm,
                                             CharSequence cs,
                                             View.OnClickListener onOkClickListener,
                                             View.OnClickListener onCancelClickListener) {
        ConfirmDialogFragment dlg = new ConfirmDialogFragment();
        dlg.setContent(cs);
        dlg.setOnOkClickListener(onOkClickListener);
        dlg.setOnCancelClickListener(onCancelClickListener);
        dlg.show(fm, "confirm");
        return dlg;
    }

    public static ConfirmDialogFragment show(FragmentManager fm,
                                             CharSequence cs,
                                             View.OnClickListener onOkClickListener,
                                             CharSequence okCs,
                                             View.OnClickListener onCancelClickListener) {
        ConfirmDialogFragment dlg = new ConfirmDialogFragment();
        dlg.setContent(cs);
        dlg.setOnOkClickListener(onOkClickListener);
        dlg.setOk(okCs);
        dlg.setOnCancelClickListener(onCancelClickListener);
        dlg.show(fm, "confirm");
        return dlg;
    }

    @BindView(R.id.tv_msg)
    TextView tv;
    @BindView(R.id.tv_confirm)
    TextView tvConfirm;

    private CharSequence mContent;
    private CharSequence mOk;
    private View.OnClickListener mOnOkClickListener;
    private View.OnClickListener mOnCancelClickListener;

    @Override
    protected int getLayoutResID() {
        return R.layout.dialog_confirm;
    }

    @Override
    protected void initView(View contentView) {
        if (!TextUtils.isEmpty(mContent)) {
            tv.setText(mContent);
        }
        if(!TextUtils.isEmpty(mOk)) {
            tvConfirm.setText(mOk);
        }
    }

    public void setContent(CharSequence cs) {
        mContent = cs;
    }

    public void setOk(CharSequence cs) {
        mOk = cs;
    }

    public void setOnOkClickListener(View.OnClickListener onOkClickListener) {
        this.mOnOkClickListener = onOkClickListener;
    }

    public void setOnCancelClickListener(View.OnClickListener onCancelClickListener) {
        this.mOnCancelClickListener = onCancelClickListener;
    }

    @OnClick(R.id.tv_confirm)
    void confirm() {
        if (mOnOkClickListener != null) {
            mOnOkClickListener.onClick(null);
        }
        dismiss();
    }

    @OnClick(R.id.tv_cancel)
    void cancel() {
        if (mOnCancelClickListener != null) {
            mOnCancelClickListener.onClick(null);
        }
        dismiss();
    }
}
*/
